﻿using Qwen_for_Windows.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Qwen_for_Windows.Pages
{
    /// <summary>
    /// MainPage.xaml 的交互逻辑
    /// </summary>
    public partial class MainPage : Page
    {
        public MainPage()
        {
            InitializeComponent();
            Model.Qwen_File.CheckChatHistoryDirectory();
            Model.Qwen_ChatHistory.AddChatHistory_To_ListBox(ChatList);
        }

        private void AddChat_Click(object sender, RoutedEventArgs e)
        {
            ChatList.Items.Clear();
            Qwen_ChatHistory.CreateChatHistoryFile();
            Qwen_ChatHistory.AddChatHistory_To_ListBox(ChatList);
        }
    }
}
